package com.xy.blog.article.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author zanhonglei
 * @version V1.0
 * @Description:
 * @date 2020/5/27
 */
@FeignClient(name = "xy-blog-article-center",contextId = "ArticlePicApi")
public interface ArticlePicService {

    String BASE_PATH = "/v1/article-pic";

    @PostMapping(BASE_PATH + "/upload")
    Object picUpload(MultipartFile file);

    @GetMapping(BASE_PATH + "/download")
    ResponseEntity<byte[]> download(@RequestParam Long picId);


}
